package ii.zjf.week4.count;

import java.util.concurrent.*;

public class Add9 extends BaseAdd {

    public static void main(String[] args) throws InterruptedException {

        ExecutorService executorService = Executors.newSingleThreadExecutor();

        Future<?> future = executorService.submit(() -> {
            count.add();
        });

        try {
            future.get();
        } catch (ExecutionException ignored) {
        }

        System.out.println("success : " + count.getCount());

        executorService.shutdownNow();

    }
}
